<?php
$this->breadcrumbs=array(
    Yii::t('site','Admin')=>array('/admin'),
    Yii::t('site','Users')=>array('admin'),
    $model->recordName,
    Yii::t('site','View'),
);

$this->menu=array(
	array('label'=>Yii::t('site','Update User'), 'url'=>array('update', 'id'=>$model->id)),
	array('label'=>Yii::t('site','Delete User'), 'url'=>'#', 'linkOptions'=>array('submit'=>array('delete','id'=>$model->id),'confirm'=>Yii::t('site','Are you sure to delete item {recordName}?',array('{recordName}'=>$model->recordName)))),
	array('label'=>Yii::t('site','New User'), 'url'=>array('create')),
	array('label'=>Yii::t('site','List Users'), 'url'=>array('index')),
	array('label'=>Yii::t('site','Manage Users'), 'url'=>array('admin')),
);
?>

<h1><?php echo Yii::t('site','View User <em>{recordName}</em>',array('{recordName}'=>$model->recordName)); ?></h1>

<?php $this->widget('zii.widgets.CDetailView', array(
	'data'=>$model,
	'attributes'=>array(
		'id',
                'username',
                array(
                    'name'=>'registrationComplete',
                    'type'=>'raw',
                    'value'=>$model->registrationComplete==1 ? '[X]' : '&ndash;'
                ),
		'lastName',
		'firstName',
		'email',
		'profile',
	),
)); ?>

<br/>
<h2><?php echo CHtml::encode(Yii::t('site', 'Auth Items')); ?></h2>
<div class="grid-view">
<table class="items" style="width:35%">
    <thead>
        <tr>
            <th><?php echo Yii::t('site', 'Auth Item'); ?></th>
            <th><?php echo Yii::t('site','Auth Type'); ?></th>
        </tr>
    </thead>
    <tbody>
        <?php foreach($model->authAssignments as $authAssignment) : ?>
        <tr>
            <td>
                <?php echo CHtml::encode($authAssignment->itemname); ?>
            </td>
            <td>
                <?php echo AuthItem::model()->typeOptions[AuthItem::model()->findByAttributes(array('name'=>$authAssignment->itemname))->type]; ?>
            </td>
        </tr>
        <?php endforeach; ?>
    </tbody>
</table>
</div>
